<template>
	<view class="mainpadding2">
		<view class="flexcenter" v-if="!list.data.length">
			<view class="placeholderimage" style="margin-top: 300rpx;" ></view>
		</view>
		<view class="mainpadding_top ffffff radius" v-for="item in list.data" :key="item.id">
			<view class="xiaohei sanshier fonweight">{{item.createtime_text}}</view>
			<view class="xiaohei fonweight titletext margin_top">报名信息</view>
			<view class="xiaohei main_size margin_top2">姓名：{{item.username}}</view>
			<view class="xiaohei main_size margin_top2">手机号：{{item.mobile}}</view>
			<view class="xiaohei main_size margin_top2">身份证号：{{item.idcard}}</view>
			<view class="xiaohei fonweight titletext margin_top">参赛人</view>
			<view class="flexbetween margin_top2" v-for="ite in item.ssbmuser">
				<view class="xiaohei main_size ">姓名：{{ite.user.ali_name}}</view>
				<view class="xiaohei main_size">性别：<text class="xiaolv" v-show="ite.user.gender==0">男</text><text class="xiaohong"v-show="ite.user.gender==1">女</text></view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				page: 1,
				limit: 12,
				list: {
					data: []
				},
				listid:"",
				user_zbfapply_listid:"",
			}
		},
		onLoad(options) {
			this.user_zbfapply_listid=options.user_zbfapply_listid
			this.listid = options.id
			this.init()
		},
		methods: {
			init(isPage, page) {
				let _this = this;
				let data = {
					page: page || 1,
					limit: _this.limit,
					user_zbfapply_id:this.user_zbfapply_listid,
					ss_id:this.listid
				}
				let url = '/api/sscl/ssJgBmIndex'
				httpRequest.request(url, 'GET', data, false, false, true).then(res => {
					if (res.code == 1) {
						let resList = res.data;
						let dataList = _this.list;
						if (isPage == true) {
							_this.list.data = dataList.data.concat(resList.data);
						} else {
							this.list = res.data
							_this.list.data = resList.data;
						}
					}
				})
			},
			onReachBottom() {
				let _this = this;
				let list = _this.list;
				let page = _this.page;
				if (list.last_page <= page) {
					return false;
				}
				page++;
				_this.page = page;
				_this.init(true, page);
			},
		}
	}
</script>

<style>

</style>
